home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19990725-20000114 / 000208_news@columbia.edu _Sun Oct 17 16:56:25 1999.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id QAA26324
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Sun, 17 Oct 1999 16:56:25 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id QAA27196
  7.     for kermit.misc@watsun.cc.columbia.edu; Sun, 17 Oct 1999 16:27:33 -0400 (EDT)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Subject: Re: Logging Data on ttyS1 with Kermit
  11. Date: 17 Oct 1999 20:27:32 GMT
  12. Organization: Columbia University
  13. Message-ID: <7udbfk$qhp$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@columbia.edu
  15.  
  16. In article <M5qO3.2626$C8.742431@homer.alpha.net>,
  17. Eric J. Paulsen <epaulsen@smls.org> wrote:
  18. : I have a phone switch connected to my RH5.2 Linux box via a serial cable. It
  19. : simply dumps phone usage data. I would like to have kermit upon system
  20. : startup connect to /dev/ttyS1 and log all data to /var/log/phonelog.
  21. : While I can get the connection started with a line like:
  22. : kermit -l /dev/ttyS1 -b 4800 -c
  23. : I'm not sure how to get kermit to write to the specified log file. Any help
  24. : would be appreciated. TIA.
  25. Try this:
  26.  
  27.   kermit -C "set line /dev/ttyS1, set speed 4800, -
  28.   log session /var/log/phonelog, input -1 XXXX"
  29.  
  30. where "input -1" means "no time limit" and XXXX is some character string
  31. that will never come.  (Note: the line is broken for news; put it all one
  32. one line).
  33.  
  34. Better, however, to use a script.  The following is for C-Kermit 7.0:
  35.  
  36. ---(cut here)---
  37. #!/usr/local/bin/wermit +
  38. set carrier-watch off                 ; If the device does not assert CD
  39. set modem type none
  40. set line /dev/ttyS1
  41. if fail exit 1 Can't open /dev/ttyS1
  42. set speed 4800
  43. log session /var/log/phonelog append  ; Append to this log file
  44. if fail exit 1 Can't open /var/log/phonelog
  45. input -1 SOME-STRING-THAT-WILL-NEVER-COME
  46. if fail exit 1 INPUT failed
  47. exit 0 ; Theoretically this statement will not be reached.
  48. ---(cut here)---
  49.  
  50. Cut out and save the script, if necessary change the first line to reflect
  51. the actual location of the C-Kermit 7.0 binary, give the script execute
  52. permission, and run it as if it were a shell script.  Find C-Kermit 7.0 at:
  53.  
  54.   http://www.columbia.edu/kermit/ck70.html
  55.  
  56. - Frank